The present invention relates to a communication device such as a router provided between an external network represented by an internet and user terminal devices such as a PC (Personal Computer) or an IP (Internet Protocol) telephone to carry out a filtering operation or a routing operation of packets distributed between networks and a control method for the communication device.
In recent years, with the growth of an internet or a broad band environment, IP terminal devices have been rapidly spread in enterprises or homes. When user terminal devices (IP terminals) composed of a plurality of PCs or IP telephones are connected to an external network such as the internet, as has been popularized, a router device is disposed at an inlet of the internet so that a communication device such as a router is allowed to carry out a routing operation between the plurality of user terminal devices in the homes or the enterprises and the external network.
Most of the routers have DHCP server functions to select one IP address from an address pool held by itself and assign the IP address to the user terminal device connected to an inner side of a LAN by the DHCP server function.
When the IP address is assigned to the user terminal device, the router sets a lease period of the IP address and informs a user terminal device 113 of a DHCP message including the lease period. Ordinarily, the above-described lease period is set to a fixed value, for instance, one hour. After the lease period elapses, a right of using the assigned IP address is released. Accordingly, the user terminal device needs to send to the router a request for extending the lease period (a request for extension) until the end of the lease period.
A time provided until the request for extending the lease period is outputted after the IP address is assigned to the user terminal device is prescribed as a Renewing Time in the protocol of the DHCP. In a default, the Renewing Time is set to ½ as long as the lease period. When the DHCP server of the router does not respond to the request for extending again the lease period, after a Rebinding Time in the default set to ⅞ as long as the lease period elapses, the user terminal device transmits again a packet for searching the DHC server.
On the other hand, an IP address is assigned to a WAN side of the router device connected to the external network from an external DHCP server existing on the external network. Since the assigned IP address is set irrespective of the IP address set to the LAN side of the router device, the network address of the WAN side of the router device may be possibly the same as the network address of the LAN side.
For instance, there is a case that under a state where a private address of 192.168.0.254/24 is set to the LAN side, a private address having the same network address of 192.168.0.1/254 is set to the WAN side.
In such a case, since the router has the same segment in the WAN side and the LAN side, the router cannot decide to which interface a packet supplied to the router is to be routed to generated a state that a communication cannot be made.
In the above-described usual structure, when the network addresses of the WAN side and the LAN side of the router are duplicated, since the lease period of the IP address by the DHCP server function of the router is set to the fixed value of a long time such as one hour, the Renewing Time is also set to the long time such as 30 minutes half as long as the lease period. Thus, a problem arises that the user terminal device is brought into a state that the communication cannot be made until the Renewing Time elapses.
Further, a method for shortening the lease period to a second unit may be carried out. However, when this method is employed, problems arise that the packets of the DHCP are frequently distributed on the network of the LAN side, which is not preferable in view of a quantity of traffic, and the processing performance of the user terminal device or the router is deteriorated.